﻿using FileTransfer.Assistantor;
using System;
using System.ComponentModel;

namespace FileTransfer.Vollk.Model
{
    /// <summary>
    /// FTP端文件模型
    /// </summary>
    public class FileStruct
    {
        /// <summary>
        /// 文件编号  0
        /// </summary>
        [DisplayName("文件编号")]
        public string ID { get; set; }
        /// <summary>
        /// 文件或目录名称  1
        /// </summary>
        [DisplayName("文件名称")]
        public string Name { get; set; }
        /// <summary>
        /// 文件扩展名  2
        /// </summary>
        [DisplayName("文件扩展名")]
        public string FileExtName { get; set; }
        /// <summary>
        /// 远端文件路径  3
        /// </summary>  
        [DisplayName("远端文件路径")]
        public string RemotePath { get; set; }
        /// <summary>
        /// 本地存储路径  4
        /// </summary>
        [DisplayName("本地存储路径")]
        public string LocalPath { get; set; }
        /// <summary>
        /// 文件大小  5
        /// </summary>
        [DisplayName("大小[M]")]
        public string SizeStr { get { return FileAssistantor.GetLengthStr(Size); }}
        /// <summary>
        /// 媒体资源文件大小  6
        /// </summary>
        [DisplayName("大小")]
        public long Size { get; set; }
        /// <summary>
        /// 时长 7
        /// </summary>
        [DisplayName("时长字符")]
        public string TimeStr { get; }
        /// <summary>
        /// 媒体资源时长 8
        /// </summary>
        [DisplayName("时长")]
        public TimeSpan Duration { get; set; }
        /// <summary>
        /// 目录名称  9
        /// </summary>
        [DisplayName("目录名称")]
        public string DirectoryName { get; set; }
        /// <summary>
        /// 是否为目录  10
        /// </summary>
        [DisplayName("是否目录")]
        public bool IsDirectory { get; set; }
        /// <summary>
        /// 是否下载  11
        /// </summary>
        [DisplayName("是否下载")]
        public bool BEnable { get; set; } = false;
        /// <summary>
        /// 创建时间  12
        /// </summary>
        [DisplayName("创建时间")]
        public string CreateTime { get; set; }
        /// <summary>
        /// 归属站点 13
        /// </summary>
        [DisplayName("站点")]
        public string Site { get; set; }
    }
}
